module.exports = {
    bundler: '@vuepress/webpack',
    markdown: {
        code: {
            lineNumbers: false
        }
    },
    locales: {
        '/zh/': {
            lang: 'zh-CN',
            title: 'Inertia.js 中文文档',
            description: 'Inertia.js 中文文档'
        },
        '/en/': {
            lang: 'en-US',
            title: 'Inertia.js',
            description: 'Inertia.js'
        }
    },
    themeConfig: {
        logo: '/assets/img/logo.png',
        smoothScroll: true,
        sidebar: 'auto',
        locales: {
            '/zh/': {
                home: '/README.md',
                // 多语言下拉菜单的标题
                selectLanguageText: '选择语言',
                // 该语言在下拉菜单中的标签
                selectLanguageName: '简体中文',
                selectLanguageAriaLabel: '简体中文',
                // 编辑链接文字
                editLinkText: '在 GitHub 上编辑此页',
                // Service Worker 的配置
                serviceWorker: {
                    updatePopup: {
                        message: "发现新内容可用.",
                        buttonText: "刷新"
                    }
                },
                // 当前 locale 的 algolia docsearch 选项
                algolia: {},
                navbar: [
                    // NavbarItem
                    {
                        text: '官方文档',
                        link: 'https://inertiajs.com',
                    },
                ],
                tip: "提示",
                warning: "警告",
                danger: "危险",
                sidebar: [
                    // SidebarItem
                    '/zh/introduction.md',
                    '/zh/demo-app.md',
                    '/zh/sponsors.md',
                    '/zh/releases.md',
                    {
                        text: '核心概念',
                        link: '/zh/core/who-is-it-for.md',
                        children: [
                            '/zh/core/who-is-it-for.md',
                            '/zh/core/how-it-works.md',
                            '/zh/core/the-protocol.md'
                        ]
                    },
                    {
                        text: '起步',
                        link: '/zh/installation/server-side-setup.md',
                        children: [
                            '/zh/installation/server-side-setup.md',
                            '/zh/installation/client-side-setup.md',
                        ]
                    },
                    {
                        text: '基础',
                        link: '/zh/basics/routing.md',
                        children: [
                            '/zh/basics/routing.md',
                            '/zh/basics/responses.md',
                            '/zh/basics/pages.md',
                            '/zh/basics/title-and-meta.md',
                            '/zh/basics/links.md',
                            '/zh/basics/manual-visits.md',
                            '/zh/basics/redirects.md',
                            '/zh/basics/forms.md',
                            '/zh/basics/file-uploads.md',
                            '/zh/basics/validation.md',
                            '/zh/basics/shared-data.md'
                        ]
                    },
                    {
                        text: '高级',
                        link: '/zh/advanced/events.md',
                        children: [
                            '/zh/advanced/events.md',
                            '/zh/advanced/testing.md',
                            '/zh/advanced/partial-reloads.md',
                            '/zh/advanced/scroll-management.md',
                            '/zh/advanced/authentication.md',
                            '/zh/advanced/authorization.md',
                            '/zh/advanced/csrf-protection.md',
                            '/zh/advanced/error-handling.md',
                            '/zh/advanced/asset-versioning.md',
                            '/zh/advanced/progress-indicators.md',
                            '/zh/advanced/remembering-state.md',
                            '/zh/advanced/server-side-rendering.md',
                        ]
                    }
                ],
            },
            '/en/': {
                selectLanguageText: 'Languages',
                selectLanguageName: 'English',
                selectLanguageAriaLabel: 'Languages',
                editLinkText: 'Edit this page on GitHub',
                serviceWorker: {
                    updatePopup: {
                        message: "New content is available.",
                        buttonText: "Refresh"
                    }
                },
                algolia: {},
                nav: [
                    { text: 'Nested', link: '/en/introduction', ariaLabel: 'Nested' }
                ],
                sidebar: [
                    // SidebarItem
                    '/en/introduction.md',
                    '/en/demo-app.md',
                    '/en/sponsors.md',
                    '/en/releases.md',
                    {
                        text: 'Core concepts',
                        link: '/en/core/who-is-it-for.md',
                        children: [
                            '/en/core/who-is-it-for.md',
                            '/en/core/how-it-works.md',
                            '/en/core/the-protocol.md'
                        ]
                    },
                    {
                        text: 'Installation',
                        link: '/en/installation/server-side-setup.md',
                        children: [
                            '/en/installation/server-side-setup.md',
                            '/en/installation/client-side-setup.md',
                        ]
                    },
                    {
                        text: 'Basics',
                        link: '/en/basics/routing.md',
                        children: [
                            '/en/basics/routing.md',
                            '/en/basics/responses.md',
                            '/en/basics/pages.md',
                            '/en/basics/title-and-meta.md',
                            '/en/basics/links.md',
                            '/en/basics/manual-visits.md',
                            '/en/basics/redirects.md',
                            '/en/basics/forms.md',
                            '/en/basics/file-uploads.md',
                            '/en/basics/validation.md',
                            '/en/basics/shared-data.md'
                        ]
                    },
                    {
                        text: 'Advanced',
                        link: '/en/advanced/events.md',
                        children: [
                            '/en/advanced/events.md',
                            '/en/advanced/testing.md',
                            '/en/advanced/partial-reloads.md',
                            '/en/advanced/scroll-management.md',
                            '/en/advanced/authentication.md',
                            '/en/advanced/authorization.md',
                            '/en/advanced/csrf-protection.md',
                            '/en/advanced/error-handling.md',
                            '/en/advanced/asset-versioning.md',
                            '/en/advanced/progress-indicators.md',
                            '/en/advanced/remembering-state.md',
                            '/en/advanced/server-side-rendering.md',
                        ]
                    }
                ],
            },
        }
    },
    configureWebpack:  {
        resolve: {
            alias: {
                '@img': 'public/assets/img'
            }
        },
    },
}
